package com.tvpush.manage.core.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 广告信息
 * </p>
 *
 * @author ouyangzn
 * @since 2019-03-22
 */
@Data
@Accessors(chain = true)
@TableName("tp_advertisement")
public class Advertisement extends Model<Advertisement> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 广告主
     */
    private String advertisers;
    /**
     * 标题
     */
    private String title;
    /**
     * 投放时间
     */
    private Date date;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 广告状态 0正常 1下架
     */
    private Integer status;
    /**
     * 监测信息
     */
    private String monitor;
    /**
     * 图片
     */
    private String image;
    /**
     * 开机视频
     */
    private String video;
    /**
     * 投放盟友
     */
    @TableField("ally_id")
    private Long allyId;
    /**
     * 备注
     */
    private String remark;
    /**
     * 0 开机广告 1关机广告
     */
    private Integer type;


    public static final String ID = "id";

    public static final String ADVERTISERS = "advertisers";

    public static final String TITLE = "title";

    public static final String DATE = "date";

    public static final String CREATE_TIME = "create_time";

    public static final String STATUS = "status";

    public static final String MONITOR = "monitor";

    public static final String IMAGE = "image";

    public static final String VIDEO = "video";

    public static final String ALLY_ID = "ally_id";

    public static final String REMARK = "remark";

    public static final String TYPE = "type";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
